/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.farent.solutions.common.discovery.ejbs;

import com.farent.solutions.common.discovery.ClassResolver.ClassSelectionStrategy;
import com.farent.solutions.common.discovery.ejbs.EjbsAnnotationsProcessor;
import com.farent.solutions.jeeunit.JeeUnitConfiguration;

/**
 *
 * @author Farouk.Alhassan
 */
public class EJBClassResolverProcessor extends EjbsAnnotationsProcessor{

    private final ClassSelectionStrategy strategy;

    public EJBClassResolverProcessor(ClassSelectionStrategy strategy) {
        this.strategy = strategy;
    }
    
    @Override
    public String getRootPackage() {
        return JeeUnitConfiguration.getInstance().getValue("root-package-name");
    }

    @Override
    public ClassSelectionStrategy createClassSelectionStrategy( Class clazz ) {
        strategy.setClass(clazz);
        return strategy;
    }
}
